<?php
/***********************************************************************
 * @package     IvanEngine
 * @subpackage  Core
 * @author      Ivan <ivanzx@msn.com>
 * @created     2010-06-16
 ***********************************************************************/
if(defined("IVANENGINE_CORE_IO_STREAM"))
    die("Redefinition macro in :".__FILE__."(".__LINE__.")");
define("IVANENGINE_CORE_IO_STREAM", true);

interface IStream
{
    public function Open($data, $mode = 'r');
    
    public function Close();

    public function Read($length = 1);
    
    public function ReadAll();

    public function Write($data, $length=null);
    
    public function WriteAll($data, $length=null);
    
    public function Seek($offset, $whence=SEEK_SET);

    public function Tell();

    public function Flush();

    public function Lock($lockType, $nonBlockinLock = false);

    public function Unlock();
    
    public function Size();
}
?>
